{ Summer Informatics School.
  Problemset: http://agul-problems1.googlecode.com/svn/trunk/2010-2011/sis/problemset11.pdf
  Problem L
  Points: 100
}
var i,n,s,t:longint;
begin
read(n);
for i:=100 to 999 do begin
  s:=0;
  t:=i;
  while t>0 do begin
    inc(s,t mod 10);
    t:=t div 10;
  end;
  if s=n then writeln(i);
end;
end.
